<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1,maximum-scale=1">
	<title>vue前后端分离</title>
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/login.css">
	<script src="js/jquery-1.10.2.js"></script>
</head>
<body >
	<div class="login_cont">
		<div class="login_nav">
			<div class="nav_slider">
				<a href="#" class="signin focus">请登录</a>
			</div>
		</div>
		<form>
			<div class="input_signin  active">
				<input class="input" id="login_user_name" type="text" aria-label="用户名" placeholder="用户名">
				<div class="hint">请输入用户名</div>
				<input class="input" id="login_password" type="password" aria-label="密码" placeholder="密码">
				<div class="hint">请输入密码</div>
				<input onclick="login()" class="button" name="button" style="text-align: center;" value="登录">
			</div>
		</form>
	</div>

</body>
<script src="../assets/js/jquery.min.js"></script>
<script>
	function login(){
	     $.ajax({
	          url: "http://39.108.147.139:9091/loginuser",
	          type: "post",
			  data: {
			    username:$("#login_user_name").val(),
			    password:$("#login_password").val()
			  },
	          success: function (data) {
				  alert(data.msg)
				  if(data.status=200){
					  window.location.href="../index.html";
				  }
	          }
	     });	 
	}      
</script>
</html>